package com.freshmarket.freshmarket.service;

import com.freshmarket.freshmarket.controller.form.NewOrderByCarForm;
import com.freshmarket.freshmarket.controller.form.NewOrderByLimitedForm;
import com.freshmarket.freshmarket.entity.Orders;
import com.baomidou.mybatisplus.extension.service.IService;
import com.freshmarket.freshmarket.entity.User;
import com.freshmarket.freshmarket.utils.Result;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Squirrel
 * @since 2020-09-04
 */
public interface IOrdersService extends IService<Orders> {

    @Transactional
    void newOrderByCar(NewOrderByCarForm newOrderByCarForm) throws Exception;

    @Transactional
    void payOrders(int ordersId) throws Exception;

    void newOrderByLimited(NewOrderByLimitedForm newOrderByLimitedForm)throws Exception;

    @Transactional
    void rollbackOrders(int ordersId) throws Exception;

    /**
     * 查询个人订单
     */
    Result selectPersonOrdersAll(int pageIndex,int pageSize,Integer userId,String ordersStatus) throws Exception;
}
